Method for displaying graphical user interface and mobile terminal

ABSTRACT

A method for displaying a graphical user interface (GUI) is disclosed, which relate to the data processing field. The method specifically includes: determining whether a display of a device is shielded; when it is determined that the display is shielded, determining a shielded area and a display area of the display; determining parameter information of the display area, where the parameter information includes an area size of the display area and a position of the display area; and obtaining, according to the parameter information, a GUI that matches the display area, and displaying the GUI in the display area. Whether a display of the device is shielded is determined. When the display is shielded, the GUI is displayed in the display area, so that the GUI can be displayed only in the display area of the display and does not need to be displayed in full screen.

This application is a national stage of International Application No.PCT/CN2015/099000, filed on Dec. 25, 2015, which claims priority toChinese Patent Application No. 201410849524.8, filed on Dec. 30, 2014.Both of the aforementioned applications are hereby incorporated byreference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the data processing field, and inparticular, to a method for displaying a graphical user interface and amobile terminal.

BACKGROUND

With rapid development of information technologies, display screens ofvarious mobile terminals such as a mobile phone and a tablet computerare increasingly large. To protect a display screen of a mobileterminal, increasing users use a protective case with a screenprotection assembly. However, when various application programs in anexisting mobile terminal are in a running process, an applicationinterface is usually displayed in full screen. Therefore, when using themobile terminal, a user needs to open a protective case before the usercan view a currently running application interface and perform anoperation on the application interface on the display screen.

In a process of implementing the present disclosure, the inventor findsthat at least the following problem exists in the prior art:

In the prior art, an application interface of a mobile terminal isdisplayed in full screen; therefore, after a protective case is opened,leakage of information displayed on the application interface is easilycaused, which degrades security of the mobile terminal.

SUMMARY

To resolve the foregoing technical problem, embodiments of the presentdisclosure provide a method for displaying a graphical user interface ona mobile terminal and a mobile terminal. Technical solutions are asfollows:

According to a first aspect, a technical solution provides a method fordisplaying a graphical user interface, where the method includes:

determining whether a display screen of the mobile terminal is shielded;

when it is determined that the display screen is shielded, determining ashielded area and a display area of the display screen, where thedisplay area is used to display a graphical user interface;

determining parameter information of the display area, where theparameter information includes an area size of the display area and aposition of the display area in the display screen; and

obtaining, according to the parameter information, a graphical userinterface that matches the display area, and displaying the graphicaluser interface in the display area.

In the foregoing technical solution, a graphical user interface of anapplication can be displayed only in a display area of a display screen,and does not need to be displayed in full screen, which reduces apossibility of information leakage and ensures better privacy.

With reference to the first aspect, in a first implementation manner ofthe first aspect, the determining whether a display screen of the mobileterminal is shielded is specifically: detecting an ambient lightintensity by using a light sensor disposed on the mobile terminal; anddetermining whether the display screen is shielded according to whethera change value of the ambient light intensity is greater than a presetchange threshold.

With reference to the first aspect, in a second implementation manner ofthe first aspect, two groups of light sensors configured to detect anambient light intensity are disposed on the mobile terminal: a firstgroup of light sensors and a second group of light sensors; and thedetermining whether a display screen of the mobile terminal is shieldedis specifically: determining whether ambient light intensities detectedby the first group of light sensors are less than ambient lightintensities detected by the second group of light sensors at the sametime.

With reference to the first implementation manner or the secondimplementation manner of the first aspect, in a third implementationmanner of the first aspect, the determining a shielded area and adisplay area of the display screen is specifically: determining an areawhose ambient light intensity is greater than or equal to a preset firstthreshold and that is in the display screen as a display area; anddetermining an area whose ambient light intensity is less than thepreset first threshold and that is in the display screen as a shieldedarea.

With reference to the first aspect, in a fourth implementation manner ofthe first aspect, the determining whether a display screen of the mobileterminal is shielded specifically includes: detecting, by using apressure sensor disposed on the mobile terminal, whether a pressurevalue applied on the display screen is greater than or equal to a presetpressure threshold, to determine whether the display screen of themobile terminal is shielded.

With reference to the fourth implementation manner of the first aspect,in a fifth implementation manner of the first aspect, the determining ashielded area and a display area of the display screen specificallyincludes: determining an area whose pressure value applied on thedisplay screen is greater than or equal to a preset second threshold asa shielded area, and determining an area whose pressure value applied onthe display screen is less than the preset second threshold as a displayarea.

With reference to any one of the first aspect, or the first to the fifthimplementation manners of the first aspect, in a sixth implementationmanner of the first aspect, before the determining whether a displayscreen of the mobile terminal is shielded, the method further includes:detecting whether the display screen is lighted up.

With reference to any one of the first aspect, or the first to the sixthimplementation manners of the first aspect, in a seventh implementationmanner of the first aspect, a graphical user interface displayed in thedisplay area is specifically a graphical user interface that is of anapplication and that is displayed on the display screen before thedisplay screen is shielded.

With reference to any one of the first aspect, or the first to theseventh implementation manners of the first aspect, in an eighthimplementation manner of the first aspect, the obtaining, according tothe parameter information, a graphical user interface that matches thedisplay area is specifically:

obtaining, according to a display area position in the parameterinformation, a graphical user interface of an application programcorresponding to the display area position; or obtaining, according to adisplay area size in the parameter information, a graphical userinterface of a window widget corresponding to the display area size.

According to a second aspect, a technical solution provides a mobileterminal, including a display screen, where the mobile terminal furtherincludes:

a judging module, configured to determine whether the display screen ofthe mobile terminal is shielded;

a determining module, configured to: when the judging module determinesthat the display screen is shielded, determine a shielded area and adisplay area of the display screen, where the display area is used todisplay a graphical user interface, and

the determining module is further configured to determine parameterinformation of the display area, where the parameter informationincludes an area size of the display area and a position of the displayarea in the display screen; and

a display module, configured to obtain, according to the parameterinformation in the determining module, a graphical user interface thatmatches the display area, and display the graphical user interface inthe display area.

With reference to the second aspect, in a first implementation manner ofthe second aspect, the mobile terminal further includes a sensor module,where the sensor module is connected to the judging module; and that thejudging module determines whether the display screen of the mobileterminal is shielded is specifically: detecting, by the sensor module,an ambient light intensity; and determining, by the judging module,whether the display screen is shielded according to whether a changevalue of the ambient light intensity is greater than a preset changethreshold.

With reference to the second aspect or the first implementation mannerof the second aspect, in a second implementation manner of the secondaspect, that the determining module determines the shielded area and thedisplay area of the display screen is specifically: determining, by thedetermining module, an area whose ambient light intensity is greaterthan or equal to a preset first threshold and that is in the displayscreen as a display area, and determining an area whose ambient lightintensity is less than the preset first threshold and that is in thedisplay screen as a shielded area.

With reference to any one of the second aspect, or the first to thesecond implementation manners of the second aspect, in a thirdimplementation manner of the second aspect, a graphical user interfacedisplayed in the display area is specifically a graphical user interfacethat is of an application and that is displayed on the display screenbefore the display screen is shielded.

According to a third aspect, a technical solution provides anothermobile terminal, where the mobile terminal includes a touchscreen and acentral processing unit; and

the central processing unit determines whether the touchscreen of themobile terminal is shielded;

when determining that the touchscreen is shielded, the centralprocessing unit determines a shielded area and a display area of thetouchscreen, where the display area is used to display a graphical userinterface;

the central processing unit determines parameter information of thedisplay area, where the parameter information includes an area size ofthe display area and a position of the display area in the touchscreen;and

the central processing unit obtains, according to the parameterinformation, a graphical user interface that matches the display area,and displays the graphical user interface in the display area of thetouchscreen.

With reference to the third aspect, in a first implementation manner ofthe third aspect, the mobile terminal further includes a light sensorarray, where the light sensor array is connected to the centralprocessing unit; and that the central processing unit determines whetherthe touchscreen of the mobile terminal is shielded is specifically:detecting, by the light sensor array, an ambient light intensity; anddetermining, by the central processing unit, whether the touchscreen isshielded according to whether a change value of the ambient lightintensity is greater than a preset change threshold.

With reference to the first implementation manner of the third aspect,in a second implementation manner of the third aspect, that the centralprocessing unit determines the shielded area and the display area of thetouchscreen is specifically: determining, by the central processingunit, an area whose ambient light intensity is greater than or equal toa preset first threshold as a display area in the touchscreen, anddetermining an area whose ambient light intensity is less than thepreset first threshold as a shielded area in the touchscreen.

With reference to the third aspect, in a third implementation manner ofthe third aspect, the mobile terminal further includes a pressure sensorarray, where the pressure sensor array is connected to the centralprocessing unit; and that the central processing unit determines whetherthe touchscreen of the mobile terminal is shielded is specifically:detecting, by the pressure sensor array, a pressure value applied on thetouchscreen; and determining, by the central processing unit, whetherthe touchscreen of the mobile terminal is shielded according to whetherthe pressure value is greater than a preset pressure threshold.

With reference to the third implementation manner of the third aspect,in a fourth implementation manner of the third aspect, that the centralprocessing unit determines the shielded area and the display area of thetouchscreen specifically includes: determining, by the centralprocessing unit, an area whose pressure value applied on the touchscreenis greater than or equal to a preset second threshold as a shieldedarea, and determining an area whose pressure value applied on thetouchscreen is less than the preset second threshold as a display area.

With reference to any one of the third aspect, or the first to thefourth implementation manners of the third aspect, in a fifthimplementation manner of the third aspect, a graphical user interfacedisplayed in the display area is specifically a graphical user interfacethat is of an application and that is displayed on the touchscreenbefore the touchscreen is shielded.

According to a fourth aspect, a technical solution provides a mobileterminal, where the mobile terminal includes: the mobile terminalincludes one or more processors, a display, a storage apparatus, and oneor more programs; the one or more programs are stored in the storageapparatus and are configured to be executed by the one or moreprocessors; and the one or more programs include:

determining whether the display is shielded;

when it is determined that the display is shielded, determining ashielded area and a display area of the display, where the display areais used to display a graphical user interface;

determining parameter information of the display area, where theparameter information includes an area size of the display area and aposition of the display area in the display; and

obtaining, according to the parameter information, a graphical userinterface that matches the display area, and displaying the graphicaluser interface in the display area.

According to a fifth aspect, a technical solution provides a method fordisplaying a graphical user interface, where the method includes:

obtaining, by a mobile terminal, a folding type of a screen protectionassembly and parameter information of the folding type;

obtaining, by the mobile terminal, an application interface that matchesthe screen protection assembly, and storing the application interface ina local database;

detecting, by the mobile terminal, an unshielded area on a screen;

obtaining, by the mobile terminal, parameter information of theunshielded area;

obtaining, by the mobile terminal, a quantity of applicationscorresponding to the unshielded area and an application identifier ofeach application;

obtaining, by the mobile terminal according to the parameter informationof the unshielded area, the quantity of applications, and theapplication identifier of the application, an application interfacedisplay structure that matches the unshielded area; and

displaying, by the mobile terminal according to the applicationinterface display structure, an application interface that matches theunshielded area.

The technical solutions provided in the embodiments of the presentdisclosure bring the following beneficial effects:

An unshielded area on a screen is detected, and an application interfacethat matches the unshielded area is displayed, so that the applicationinterface can be displayed only in the unshielded area on the screen,and does not need to be displayed in full screen, which reduces apossibility of information leakage and ensures better privacy.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentdisclosure more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of the present disclosure, and a person ofordinary skill in the art may still derive other drawings from theseaccompanying drawings without creative efforts.

FIG. 1 is a flowchart of a method according to an embodiment of thepresent disclosure;

FIG. 2 is a schematic diagram of a structure of a mobile terminalaccording to an embodiment of the present disclosure;

FIG. 3A to FIG. 3C are schematic diagrams of a mobile terminal shieldedby obstructions according to an embodiment of the present disclosure;

FIG. 4 is another schematic diagram of a mobile terminal shielded by anobstruction according to an embodiment of the present disclosure;

FIG. 5 is a schematic diagram of a graphical user interface of SMSaccording to an embodiment of the present disclosure;

FIG. 6 is a schematic diagram of a graphical user interface of SMS of ashielded mobile terminal according to an embodiment of the presentdisclosure;

FIG. 7 is a flowchart of a method according to another embodiment of thepresent disclosure;

FIG. 8 is a schematic diagram of different folding statuses of a screenprotection assembly according to an embodiment of the presentdisclosure;

FIG. 9 is a schematic diagram of different folding statuses of anotherscreen protection assembly according to an embodiment of the presentdisclosure;

FIG. 10 is a schematic diagram of an opened screen protection assemblyaccording to an embodiment of the present disclosure;

FIG. 11 is a schematic diagram of a graphical user interface of a mobileterminal according to an embodiment of the present disclosure;

FIG. 12 is a schematic diagram of another graphical user interface of amobile terminal according to an embodiment of the present disclosure;and

FIG. 13 is a schematic diagram of a structure of a mobile phoneaccording to an embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of thepresent disclosure clearer, the following further describes theembodiments of the present disclosure in detail with reference to theaccompanying drawings.

The terms used in the embodiments of the present disclosure are merelyfor the purpose of illustrating specific embodiments, and are notintended to limit the present disclosure. The terms “a” and “the” ofsingular forms used in the embodiments and the appended claims of thepresent disclosure are also intended to include plural forms, unlessotherwise specified in the context clearly. It should also be understoodthat, the term “and/or” used herein indicates and includes any or allpossible combinations of one or more associated listed items.

It should be understood that although terms such as “first”, “second”,and “third” may be used in the embodiments of the present disclosure todescribe various preset thresholds, the thresholds should not be limitedby these terms. These terms are merely used to distinguish between thevarious preset thresholds. For example, without departing from the scopeof the embodiments of the present disclosure, a first threshold may alsobe referred to as a second threshold; similarly, a second threshold mayalso be referred to as a first threshold.

Depending on the context, as used herein, the word “if” may be construedas “at the time of . . . ”, “when . . . ”, “in response to determining”,or “in response to detecting”. Similarly, depending on the context, thephrase “if it is determined” or “if detecting (a described condition orevent)” may be construed as “when determining”, “in response todetermining”, “when detecting (the described condition or event)”, or“in response to detecting (the described condition or event)”.

It should be noted that when an element is described as “fastened to” or“disposed on” another element, the element may be directly on theanother element, or a mediate element may also exist; when an element isdescribed as “connected to” another element, the element may be directlyconnected to the another element, or a mediate element may also exist.

It should be further noted that orientation terms such as left, right,upper, lower, and middle in the embodiment are only relative concepts orrelative to a normal usage state of a product, and should not beconsidered limiting.

In this specification, a mobile terminal includes, but is not limitedto, a mobile phone, a tablet computer, a notebook computer, or awearable electronic device (for example, a smart watch that canimplement communication).

Referring to FIG. 1, an embodiment shown in FIG. 1 provides a method fordisplaying a graphical user interface of a mobile terminal. The methodspecifically includes the following steps.

Step 101: The mobile terminal determines whether a display screen isshielded.

In this embodiment of the present disclosure, the display screen of themobile terminal is a component that displays a graphical user interfaceto a user, so that the mobile terminal can perform better human-machineinteraction with the user. It may be understood that, in the art, thedisplay screen of the mobile terminal may be various types of displayscreens, such as a resistive touch display screen, a capacitive touchdisplay screen, and a pressure-sensitive display screen. These displayscreens have a common feature, that is, these display screens notify theuser of relevant information by displaying a graphical user interface tothe user. “Shield” specifically means that a part of the display screenof the mobile terminal is covered by an obstruction, which causes a casein which the user cannot see covered display content. For example, adisplay area of 30% of a display screen of a tablet computer is coveredby a book, or a display area of 40% of a display screen of a mobilephone is covered by a palm (one palm or two palms) of a user, which maybe considered that the display screen of the mobile terminal is shieldedby an obstruction (such as a book or a palm). Certainly, in a normaloperation process of the mobile terminal, the user uses a finger to tapthe display screen or slide on the display screen. The normal operationessentially makes a part of the display screen of the mobile terminalcovered by a moving figure. This embodiment may also include this case.

However, it may be understood that to distinguish the normal operation(such as tap or slide) performed on the display screen by a figure ofthe user, a preset threshold may be set on the mobile terminal. When anarea of the display screen of the mobile terminal covered by anobstruction exceeds the preset threshold, the mobile terminal maydetermine that the display screen is shielded.

There are multiple technical solutions in which the mobile terminaldetermines whether the display screen is shielded.

Optionally, for example, a light sensor may be disposed on the mobileterminal. The light sensor may be disposed on a frame that is on a sameside with the display screen of the mobile terminal. Whether the displayscreen is shielded is determined according to an ambient light dataresult collected by the light sensor. A person of ordinary skill in theart may learn that the light sensor is an optoelectronic sensor, whichis an apparatus that converts an optical signal into an electricalsignal and finally outputs a voltage signal.

Specifically, multiple light sensors may be disposed on a front side ofthe mobile terminal. As shown in FIG. 2, a front side of a mobile phone200 includes a rectangular display screen 201, an earpiece 202, anoptical push-button 203, and multiple light sensors disposed on theframe (as shown in FIG. 2, 204 a, 204 b, 204 c, 204 d, 204 e, 204 f, 204g, and 204 h are light sensors). The light sensors detect an ambientlight intensity in real time, and output a voltage signal by using ananalog to digital converter; or may change, according to change of theambient light intensity, a voltage value of the electrical signal outputby the light sensors. After receiving ambient light voltage datacollected by the light sensors, a processor of the mobile terminaldetermines, according to a voltage change, whether the display screen isshielded.

Optionally, two groups of light sensors configured to detect an ambientlight intensity may be disposed on the mobile terminal: a first group oflight sensors and a second group of light sensors; and the determiningwhether a display screen of the mobile terminal is shielded may bespecifically: determining whether ambient light intensities detected bythe first group of light sensors are less than ambient light intensitiesdetected by the second group of light sensors at the same time.

For example, at the same time, ambient light intensities collected bylight sensors (204 a, 204 b, 204 c, and 204 d) are respectively: 0.1 V,0.15 V, 0.18 V, and 0.2 V, which are referred to as a first group ofambient light intensities; and ambient light intensities collected bylight sensors (204 e, 204 f, 204 g, and 204 h) are respectively: 0.8 V,0.85 V, 0.9 V, and 0.95 V. It can be learned from the foregoing that thefirst group of ambient light intensities is less than a second group ofambient light intensities. Therefore, it may be determined that a rightpart of the display screen of the mobile terminal is shielded by anobstruction. As shown in FIG. 3A, the first group of ambient lightintensities collected by the light sensors (204 a, 204 b, 204 c, and 204d) that are covered by an obstruction 301 (which may be a book or a palmof a user) is much less than the second group of ambient lightintensities collected by the light sensors (204 e, 204 f, 204 g, and 204h) that are not shielded by the obstruction 301. Therefore, it may bedetermined that a right part of the display screen of the mobileterminal is shielded by an obstruction. As shown in FIG. 3B, a thirdgroup of ambient light intensities collected by light sensors (204 a,204 b, 204 e, and 204 f) that are covered by the obstruction 301 (whichmay be a book or a palm of a user) is less than a fourth group ofambient light intensities collected by light sensors (204 c, 204 d, 204g, and 204 h) that are not shielded by the obstruction 301. Therefore,it may be determined that a right part of the display screen of themobile terminal is shielded by an obstruction.

In addition, whether the display screen of the mobile terminal isshielded may also be determined according to a change value Δt ofambient light intensities collected by light sensors, where Δt is achange value of ambient light intensities collected by light sensors ina period of time t. When it is detected that a change value of ambientlight intensities collected by several light sensors is greater than apreset threshold (which may be referred to as a change threshold), itmay be determined that a display screen surrounded by the light sensorsis shielded. As shown in FIG. 3C, under a normal circumstance, a valueΔt detected by light sensors (204 a, 204 b, 204 c, 204 d, 204 e, 204 f,204 g, and 204 h) is excessively small, because ambient light does notchange greatly under a specific condition. However, when an area of thedisplay screen is covered by an obstruction, and light sensors (204 fand 204 b) near the area are also covered, a change value Δt of ambientlight intensities detected by the light sensors (204 f and 204 b) isgreater than a preset change threshold, and the mobile terminal maydetermine a shielded area of the display screen.

It may be understood that to make the technical solution of thisembodiment more complete and accurate, more light sensors disposed onthe frame of the mobile terminal indicate that a shielded area of thedisplay screen can be detected more accurately. Only an exemplarydescription is given in the foregoing embodiment, and a quantity oflight sensors is not limited in this embodiment of the presentdisclosure.

Optionally, a pressure sensor may be disposed on a display screen of themobile terminal, so that whether the display screen of the mobileterminal is shielded may be determined by using a pressure value appliedon the display screen. On the mobile terminal shown in FIG. 2, thedisplay screen is a pressure-sensitive touchscreen.

The pressure sensor disposed on the display screen collects, in realtime, a pressure value applied on the display screen. Under a normalcircumstance, when a user views information displayed on the displayscreen, no object presses the display screen, and therefore a pressurevalue of the pressure sensor is null. When an object presses the displayscreen, a pressure value of the pressure sensor on the display screen isnot null. A pressure threshold may be preset in the mobile terminal. Themobile terminal determines that the display screen is shielded only whena pressure value collected by the pressure sensor is greater than orequal to the preset pressure threshold. When a pressure value collectedby the pressure sensor is less than the preset pressure threshold, themobile terminal determines that the display screen is not shielded.

Optionally, to make detection data more accurate, multiple light sensorsmay be disposed on the frame of the mobile terminal, and the displayscreen is a pressure-sensitive touchscreen, so that the mobile terminalcan determine more accurately whether the display screen is shielded.For example, as shown in FIG. 3A, it is assumed that the display screen201 is a pressure-sensitive touchscreen. The first group of ambientlight intensities collected by the light sensors (204 a, 204 b, 204 c,and 204 d) that are covered by the obstruction 301 (which may be a bookor a palm of a user) is much less than the second group of ambient lightintensities collected by the light sensors (204 e, 204 f, 204 g, and 204h) that are not shielded by the obstruction 301. In addition, a pressurevalue in an area of the obstruction 301 is greater than the presetpressure threshold. Therefore, it may be determined that a right part ofthe display screen of the mobile terminal is shielded by an obstruction.A specific determining method is described in detail in the technicalsolution of the foregoing embodiment. Details are not described hereinagain.

Optionally, in this embodiment of the present disclosure, before thedetermining whether a display screen of the mobile terminal is shielded,the method may further include: detecting, by the mobile terminal,whether the display screen is lighted up. That the display screen islighted up specifically indicates that a power supply of the mobileterminal starts to supply power to the display screen, so that agraphical user interface is displayed on the display screen.

Step 102: When the mobile terminal determines that the display screen isshielded, the mobile terminal determines a shielded area and a displayarea of the display screen, where the display area is used to display agraphical user interface.

The mobile terminal may determine, by using the foregoing technicalsolution (a light sensor, a pressure sensor, or the like), a shieldedarea of the display screen. A specific determining method is describedin the foregoing.

Then, the mobile terminal determines the shielded area and the displayarea of the display screen. The shielded area of the display screenrefers to an area of the display screen that is covered by anobstruction, and the display area of the display screen refers to anarea of the display screen that is not covered by the obstruction. Forexample, in FIG. 4, a shielded area of the display screen is an area201-1 of the display screen indicated by a dashed line in the figure,and a display area of the display screen is an area 201-2 of the displayscreen that is not shielded by the obstruction 301 (that is, theremaining area of the display screen except the area indicated by adashed line in FIG. 4). It may be understood that the area 201-1 and thearea 201-2 of the display screen is a sum of areas of a graphical userinterface displayed on the display screen to the user when the displayscreen is in a normal state (for example, the display screen is notshielded by an obstruction). The display area is used to display agraphical user interface. Specifically, when the mobile terminaldetermines that the display screen is shielded, the display area is usedto display a graphical user interface of an application by the mobileterminal. The application may be specifically an application displayedon the entire display screen before the display screen is shielded bythe obstruction. A person skilled in the art may learn that because thedisplay area is smaller than a display area of the entire displayscreen, the displayed graphical user interface of the application may besmaller than the graphical user interface that is of the application andthat is displayed on the entire display screen before the display screenis shielded by the obstruction.

Optionally, that the mobile terminal determines a shielded area and adisplay area of the display screen may specifically include: determiningan area whose light intensity is greater than or equal to a preset firstthreshold and that is in the display screen as a display area, anddetermining an area whose light intensity is less than the preset firstthreshold and that is in the display screen as a shielded area.

Optionally, that the mobile terminal determines a shielded area and adisplay area of the display screen may specifically include: determiningan area whose pressure value applied on the display screen is greaterthan or equal to a preset second threshold as a shielded area, anddetermining an area whose pressure value applied on the display screenis less than the preset second threshold as a display area.

Step 103: The mobile terminal determines parameter information of thedisplay area, where the parameter information includes an area size ofthe display area and a position of the display area in the displayscreen.

When the mobile terminal determines the shielded area and the displayarea of the display screen, to properly display a graphical userinterface in the display area, the mobile terminal needs to determine aparameter of the display area, such as an area size of the display area,and a position of the display area in the display screen. Only after theparameter information is obtained, a graphical user interface displayedin the display area can be complete. Certainly, to improve a processingspeed of the mobile terminal and enhance intelligent performance ofhuman-machine interaction of the mobile terminal, a graphical userinterface displayed in the display area may also be incomplete.

Step 104: The mobile terminal obtains, according to the parameterinformation, a graphical user interface that matches the display area,and displays the graphical user interface in the display area.

For example, FIG. 5 is a graphical user interface that is of an SMSapplication and that is displayed when the display screen of the mobileterminal is not shielded by an obstruction. There are many icon controlson the graphical user interface. An icon 406 is a status bar of theapplication, which is used to display a state of SMS. Icons 407 and 408are a message box of the application, which is used to display specificcontent of an SMS message. An icon 404 is an input box, which is used toinput text. An icon 405 is a “send” button, which is used to triggersending of the SMS message. After it is determined, according to thetechnical solution of step 101 to step 103 in the foregoing method, thatthe display screen of the mobile terminal is shielded by an obstruction,as shown in FIG. 6, the mobile terminal determines an area 403 as ashielded area and an area 402 as a display area. To properly display thegraphical user interface of the SMS application, the mobile terminalobtains, according to parameter information of the display area 402(such as an area size of the display area and a position of the displayarea in the display screen), a re-designed graphical user interface thatis of the SMS application and that matches the display area. “Properlydisplay” described in this embodiment indicates that after the displayscreen is shielded, all graphic controls of a graphical user interfaceof an original application, that is, a graphical user interface of anapplication before the display screen is shielded by an obstruction, aredisplayed in the display area of the display screen. However, becausethe display area may be relatively small, all elements of the graphicaluser interface of the original application are displayed smaller in thedisplay area. Therefore, all graphic controls (such as icons 404, 405,406, 407 and 408 in FIG. 5 and FIG. 6) in a graphical user interfacedisplayed in the display area are the same as the graphic controls of agraphical user interface displayed when the display screen is notshielded by an obstruction, and only displayed shapes, colors, and thelike of the graphic controls may be different because of a differentsize of the display area. It may be understood that, in the foregoingshielded area.

Therefore, that the foregoing mobile terminal obtains a graphical userinterface that matches the display area may be specifically: obtaining,according to a size of the display area in the parameter information, awindow widget and a graphical user interface of an application that arecorresponding to the display area; or obtaining, according to a positionof the display area in the parameter information, a window widget and agraphical user interface of an application that are corresponding to thedisplay area. The foregoing are only two examples of obtaining agraphical user interface that matches the display area by the mobileterminal, and another example is not limited in this embodiment.

It can be learned, from a comparison between FIG. 5 and FIG. 6, that agraphical user interface of SMS displayed in the display area in FIG. 6is much smaller than that in FIG. 5. This is a proper adjustment madewithout affecting normal use by a user when the display screen of themobile terminal is shielded, which protects privacy of the user and doesnot affect user experience.

It may be understood that a graphical user interface displayed in thedisplay area may be a graphical user interface that is of an applicationand that is displayed on the display screen before the display screen isshielded by an obstruction, or may be a graphical user interface ofanother application invoked by the mobile terminal.

An application scenario of this embodiment of the present disclosure is:When a user of a mobile terminal views a private message on a displayscreen of the mobile terminal, another person passes by, the usershields a part of the display screen of the mobile terminal because theuser wants to prevent the passerby from seeing the private message.After determining that the display screen is shielded, the mobileterminal determines a display area and a shielded area of the displayscreen, and displays the private message only in the display area, whichprevents leakage of the private message, ensures better security of themobile terminal, and improves human-machine interaction performancebetween the mobile terminal and the user.

In this embodiment of the present disclosure, whether a display screenis shielded is determined. When the display screen is shielded, agraphical user interface is displayed in a display area, so that thegraphical user interface can be displayed only in the display area ofthe display screen and does not need to be displayed in full screen,which reduces a possibility of information leakage and ensures betterprivacy.

Referring to FIG. 7, an embodiment shown in FIG. 7 provides a method fordisplaying a graphical user interface. The method includes the followingsteps.

Step 201: A mobile terminal obtains a folding type of a screenprotection assembly and parameter information of the folding type.

Step 201 may include either of the following two steps 201 a and 201 b.

201 a. The mobile terminal scans a graphic code of the screen protectionassembly, and obtains, by using content pointed by a link correspondingto the graphic code, the folding type of the screen protection assemblyand the parameter information of the folding type, where the graphiccode includes a two-dimensional quick response code and a bar code.

The graphic code of the screen protection assembly may be a downloadaddress of the folding type of the screen protection assembly and theparameter information of the folding type. The content pointed by thegraphic code is a corresponding folding type of the screen protectionassembly and corresponding parameter information of the folding type.The folding type of the screen protection assembly and the parameterinformation of the folding type may be obtained by scanning the graphiccode. The graphic code may be on a packing case of the screen protectionassembly, a specification of the screen protection assembly, and thescreen protection assembly. Alternatively, the screen protectionassembly carries a two-dimensional quick response code attachment, sothat the user may hang the two-dimensional quick response codeattachment on the mobile terminal or a key for reuse by the user.

Specifically, the user taps an icon of software that has a graphic codescan function, so as to trigger an operation instruction to operate thesoftware. After detecting the operation instruction, the mobile terminalstarts the software indicated by the instruction and turns on a camera.A graphic code scan area is displayed on the screen, the user adjusts aposition between the camera and the graphic code to make the graphiccode is completely in the graphic code scan area on the screen. Whenscanning the graphic code, the mobile terminal processes the graphiccode and the graphic code automatically skips to a link pointed by thegraphic code. Parameter information of the screen protection assemblyand two options “cancel” and “download” are displayed on the screen, andthe user taps the “download” option to trigger a download instruction,and downloads the parameter information of the screen protectionassembly to the mobile terminal and stores the parameter information ofthe screen protection assembly in a local database.

201 b. The mobile terminal establishes a data connection with the screenprotection assembly, and obtains, by using the data connection, thefolding type of the screen protection assembly and the parameterinformation of the folding type from the screen protection assembly.

The screen protection assembly includes a storage module, and both thefolding type of the screen protection assembly and the parameterinformation of the folding type are stored in the storage module of thescreen protection assembly. To ensure that the mobile terminal canobtain the folding type of the screen protection assembly and theparameter information of the folding type at any time, the screenprotection assembly has a communication capability, so that the mobileterminal can interact with the screen protection assembly to obtain thefolding type of the screen protection assembly and the parameterinformation of the folding type.

To perform interaction, a manner of establishing the data connectionbetween the mobile terminal and the screen protection assembly mayinclude any one of the following manners (1) to (3).

(1) A parameter information storage module and an NFC (Near FieldCommunication) chip are built in the screen protection assembly. The NFCchip of the screen protection assembly communicates with an NFC chip ofthe mobile terminal to establish the data connection. The screenprotection assembly automatically pushes the folding type of the screenprotection assembly and the parameter information of the folding typethat are stored in the parameter information storage module to themobile terminal; in addition, the mobile terminal displays the foldingtype of the screen protection assembly, some parameter information ofthe folding type, and two options “accept” and “refuse”. The userperforms an operation on the screen. If the user agrees to obtain thefolding type of the screen protection assembly and the parameterinformation of the folding type, the user taps the “accept” option totrigger a receiving instruction. When detecting the receivinginstruction, the mobile terminal starts to receive the folding type ofthe screen protection assembly and the parameter information of thefolding type, and stores the folding type of the screen protectionassembly and the parameter information of the folding type in a localdatabase. If the user refuses to obtain the folding type of the screenprotection assembly and the parameter information of the folding type,the user taps the “refuse” option to trigger a refusing instruction.When detecting the refusing instruction, the mobile terminal refuses toreceive the folding type of the screen protection assembly and theparameter information of the folding type.

(2) The user performs operations on the mobile terminal: tap an icon ofa browser on the screen to trigger an instruction for starting thebrowser; search for an official website of a manufacture of the screenprotection assembly in a search bar of the browser; find the screenprotection assembly in the official website according to a model of thescreen protection assembly; tap the “download” option to trigger adownload instruction to download the folding type of the screenprotection assembly and the parameter information of the folding type tothe mobile terminal and store the folding type of the screen protectionassembly and the parameter information of the folding type in a localdatabase.

(3) The user performs operations on the terminal: tap an icon of abrowser on the screen to trigger an instruction for starting thebrowser; and input a link provided in a specification of the screenprotection assembly into an address box of the browser. After the linkis opened, a compressed package of the folding type of the screenprotection assembly and parameter information of the folding type, andtwo options “accept” and “refuse” are displayed on the screen. If theuser agrees to obtain the folding type of the screen protection assemblyand the parameter information of the folding type, the user taps the“accept” option to trigger a receiving instruction. When detecting thereceiving instruction, the mobile terminal starts to receive the foldingtype of the screen protection assembly and the parameter information ofthe folding type, and stores the folding type of the screen protectionassembly and the parameter information of the folding type in a localdatabase. If the user refuses to obtain the folding type of the screenprotection assembly and the parameter information of the folding type,the user taps the “refuse” option to trigger a refusing instruction.When detecting the refusing instruction, the mobile terminal refuses toreceive the folding type of the screen protection assembly and theparameter information of the folding type.

In this embodiment of the present disclosure, the folding type includesa first folding type and a second folding type.

(1) The first folding type is that a screen protection assembly can befolded in a preset manner.

A screen protection assembly of the first folding type can be dividedinto multiple folding areas, all folding areas are made of rigidmaterials, and flexible materials are used to connect every two adjacentfolding areas. Only a border of every two adjacent folding areas can befolded. When one folding area of the screen protection assembly of thefirst folding type is folded, only this folding area of the screenprotection assembly can be completely opened.

For example, referring to FIG. 8, the screen protection assembly isdivided into three triangular folding areas: upper, middle, and lower. 3a is a state of an unopened screen protection assembly; 3 b is a stateof an opened triangular folding area in the upper right corner of thescreen protection assembly; 3 c is a state of an opened triangularfolding area in the lower right corner of the screen protectionassembly.

Referring to FIG. 9, the screen protection assembly is divided intothree rectangular folding areas: upper, middle, and lower. 4 a is astate of an unopened screen protection assembly; 4 b is a state of adownward-opened rectangular folding area in the upper corner of thescreen protection assembly; 4 c is a state of an upward-openedrectangular folding area in the lower corner of the screen protectionassembly.

(2) The second folding type is that a screen protection assembly can befolded in any manner.

A screen protection assembly of the second folding type is made offlexible materials, and can be folded in any position of the screenprotection assembly. A position at which the screen protection assemblyis opened and a size of an opened area of the screen protection assemblymay be adjusted randomly.

For example, referring to FIG. 10, the screen protection assembly may berandomly coiled or folded. The user may open the screen protectionassembly at any position to form an area of any size at the user'sdiscretion.

For the first folding type and the second folding type, parameterinformation of the first folding type includes position coordinateinformation of each folding area of the screen protection assembly; andparameter information of the second folding type includes positioncoordinate information of an area of the screen protection assemblycorresponding to the screen.

Step 202: The mobile terminal obtains an application interface thatmatches the screen protection assembly, and stores the applicationinterface in a local database.

It should be noted that, in a process in which the mobile terminalobtains an application interface that matches the screen protectionassembly and stores the application interface in a local database, themobile terminal establishes a connection with a cloud server, and sendsthe parameter information of the screen protection assembly to the cloudserver. The cloud server screens out, according to the parameterinformation of the mobile terminal, an application interface thatmatches the screen protection assembly, and displays, on a screen of themobile terminal, a thumbnail of the application interface obtained bymeans of screening. The user selects a required application interfaceaccording to the thumbnail of the application interface displayed on thescreen, and taps the thumbnail of the application interface to trigger aselection instruction. When detecting the selection instruction, themobile terminal selects an application interface indicated by theinstruction, and then the user taps the “download” option displayed onthe screen to trigger a download instruction, and downloads the selectedapplication interface to the mobile terminal and stores the selectedapplication interface in the local database.

Step 203: The mobile terminal detects an unshielded area on a screen.

The mobile terminal may detect the unshielded area by using a lightsensor, a pressure sensor, or a sensing assembly disposed on a terminal.Specifically:

(1) When a light sensor is disposed on the mobile terminal, detect, byusing the light sensor, an area whose light intensity is not less than athird threshold on the screen.

When the screen protection assembly is not opened, the screen iscompletely covered; in this case, no light shines down on the screen.When an area of the screen protection assembly is opened, external lightdirectly shines down on an area that is not covered by the screenprotection assembly. Therefore, a light intensity of the area changes.The light sensor detects the light intensity on the screen. When it isdetected that a light intensity of a point or an area on the screen isnot less than the third threshold, if the screen protection assembly isof the first folding type, position coordinates of the point or the areawhose light intensity is not less than the third threshold and that ison the screen are determined, a folding area in which the point or thearea corresponding to the position coordinates is located and that is onthe screen protection assembly is determined, and an area that is on thescreen and that is corresponding to the folding area is determined as anunshielded area; or if the screen protection assembly is of the secondfolding type, the point or the area that is on the screen and whoselight intensity is not less than the third threshold is determined as anunshielded area.

(2) When a pressure sensor is disposed on the mobile terminal, detect,by using a pressure sensor, an area whose pressure is not greater than afourth threshold on the screen.

Because the screen protection assembly has a specific mass, pressureapplied on the screen when the screen protection assembly is not openedis greater than pressure applied on the screen when the screenprotection assembly is opened. When an area of the screen protectionassembly is opened, pressure applied on the screen changes. The pressuresensor detects a pressure change on the screen. When it is detected apoint or an area whose pressure is not greater than the fourth thresholdon the screen, if the screen protection assembly is of the first foldingtype, position coordinates of the point or the area whose pressure isnot greater than the fourth threshold and that is on the screen aredetermined, a folding area in which the point or the area correspondingto the position coordinates is located and that is on the screenprotection assembly is determined, and an area that is on the screen andthat is corresponding to the folding area is determined as an unshieldedarea; or if the screen protection assembly is of the second foldingtype, the point or the area that is on the screen and whose pressure isnot greater than the fourth threshold is determined as an unshieldedarea.

(3) When a sensing assembly is disposed on the screen protectionassembly, detect, by using the sensing assembly, an area whose anglechange is not less than a fifth threshold on the screen protectionassembly.

When the screen protection assembly is opened, an area of the screenprotection assembly is folded, and an angle between this area andanother unfolded area of the screen protection assembly consequentlychanges. The sensing assembly detects angle change between this area andthe unfolded areas of the screen protection assembly, and sends, bymeans of interaction with the mobile terminal, a detection result to themobile terminal. When it is detected that an angle between an area andanother area is not less than the fifth threshold on the screenprotection assembly, if the screen protection assembly is of the firstfolding type, position coordinates of this area for which an anglebetween this area and the another area is not less than the fifththreshold on the screen protection assembly are determined, a foldingarea in which an area corresponding to the position coordinates islocated and that is on the screen protection assembly is determined, andan area on the screen corresponding to the folding area is determined asan unshielded area; or if the screen protection assembly is of thesecond folding type, the area whose angle change is not less than thefifth threshold is determined as an unshielded area.

It may be understood that an unshielded area described in thisembodiment of the present disclosure is the display area in theforegoing embodiment.

Step 204: The mobile terminal obtains parameter information of theunshielded area.

After the unshielded area on the screen is determined, if a folding typeof the screen protection assembly is of the first folding type, themobile terminal determines, according to position coordinate informationof the unshielded area and folding area information corresponding to thefirst folding type, folding area information that matches the positioncoordinate information; and determines the matching folding areainformation as parameter information of the unshielded area; or if afolding type of the screen protection assembly is of the second foldingtype, the mobile terminal determines the position coordinate informationof the unshielded area on the screen as the parameter information of theunshielded area.

A position, a shape, and a size of the unshielded area may be learned byusing the position coordinate information of the unshielded area on thescreen.

Step 205: The mobile terminal obtains a quantity of applicationscorresponding to the unshielded area, and an application identifier ofeach application.

For different unshielded areas, the unshielded areas have differentparameter information and therefore may correspond to differentquantities of applications and different applications. The quantity ofapplications corresponding to the unshielded area may be set in twomanners:

(1) Parameter information is set for the unshielded area. For allunshielded areas, a quantity of applications corresponding to allunshielded areas is set to a same quantity by default. For example, twoapplications corresponding to the unshielded area are set by default,and the two applications are set as SMS and contacts by default. Whendetecting the unshielded area, the terminal obtains applicationidentifiers of the two applications: SMS and contacts.

(2) The mobile terminal recommends, to the user and according to theparameter information of the unshielded area, a proper quantity ofapplications to be displayed in the unshielded area and all applicationsthat can be displayed in the unshielded area, and the user selects aquantity of applications to be displayed in the unshielded area and aspecific application to be displayed. For example, the mobile terminaldetects an unshielded area on the screen, and determines, according toparameter information of the unshielded area, that two applications orthree applications can be displayed in the unshielded area. At thistime, a query box pops up on the screen, and displays two options “two”or “three” to ask the user whether two applications or threeapplications are required to be displayed in the unshielded area. If twoapplications are required to be displayed in the unshielded area, theuser taps the “two” option to trigger a selection instruction. Whendetecting the selection instruction, the mobile terminal determines thattwo applications are to be displayed in the unshielded area. If threeapplications are required to be displayed in the unshielded area, theuser taps the “three” option to trigger a selection instruction. Whendetecting the selection instruction, the mobile terminal determines thatthree applications are to be displayed in the unshielded area. After themobile terminal determines a quantity of applications to be displayed inthe unshielded area, application identifiers of all applications thatcan be displayed in the unshielded area are displayed on the screen. Theuser may select and determine, from all application identifiersdisplayed in the unshielded area, an application that is consistent withthe quantity of applications to be displayed in the unshielded area, andtap an application identifier corresponding to the application that isrequired to be displayed in the unshielded area to trigger a selectioninstruction. When detecting the selection instruction, the mobileterminal determines an application corresponding to the selectedapplication identifier as an application to be displayed in theunshielded area.

Step 206: The mobile terminal obtains, according to the parameterinformation of the unshielded area, the quantity of applications, andthe application identifier of the application, an application interfacedisplay structure that matches the unshielded area.

If the user selects one application for displaying in the unshieldedarea, the unshielded area is directly used as a display area of theapplication.

If the user selects multiple applications for displaying in theunshielded area, the unshielded area is divided into multiple displayareas whose quantity is the same as that of applications to bedisplayed. Each display area corresponds to one application, and a sizeof each display area is adjusted according to a shape and a size of anapplication identifier of each application, so as to ensure that when anapplication identifier is displayed in a corresponding display area, theapplication identifier of each application may be clearly displayed.

Step 207: The mobile terminal displays, according to the applicationinterface display structure, a graphical user interface of anapplication that matches the unshielded area.

An application interface that matches the unshielded area is obtainedfrom a local database according to the application interface displaystructure, and the application interface is displayed on the screen; ora graphical user interface of an application that matches the unshieldedarea is generated according to the application interface displaystructure, and the graphical user interface of the application isdisplayed on the screen.

For example, referring to FIG. 11, application identifiers of threeapplications are displayed in the unshielded area in the figure: time,SMS, and call records. A number 3 displayed in a lower corner of an SMSidentifier is a quantity of unread SMS messages, and a number 5displayed in a left corner of an identifier of call records is aquantity of missed calls.

Referring to FIG. 12, application identifiers of five applications aredisplayed in the unshielded area in the figure: time, SMS, call records,calendar, and event reminder. A number 1 displayed in an upper rightcorner of an SMS identifier is a quantity of unread SMS messages, anumber 7 displayed in an upper right corner of an identifier of callrecords is a quantity of missed calls, an identifier of the eventreminder is in a lower corner of an identifier of time, and content ofan event is displayed on an identifier of event reminder.

In this embodiment of the present disclosure, an application interfacethat matches a screen is obtained and stored in a local database, and anunshielded area on the screen is detected. An application interface thatmatches the unshielded area is obtained or automatically generated inthe local database according to parameter information of the unshieldedarea, so that a proper graphical user interface of an application can bedisplayed according to a size of the unshielded area and does not needto be displayed in full screen, which ensures better flexibility,reduces a possibility of information leakage, and ensures betterprivacy.

In this embodiment, a mobile phone is used as an example for a detaileddescription of this embodiment of the present disclosure.

It should be understood that a mobile phone 100 shown in a figure ismerely an example of a mobile terminal, and the mobile phone 100 mayhave more or less components than those shown in the figure, and maycombine two or more components or have different componentconfigurations. Various components shown in the figure may beimplemented in hardware that includes one or more signal processingcircuits and/or application-specific integrated circuits, software, or acombination of hardware and software.

Herein, the mobile phone is used as an example for specific description.FIG. 13 is a schematic diagram of a structure of a mobile phone fordisplaying a graphical user interface according to an embodiment of thepresent disclosure. As shown in FIG. 10, the mobile phone includes amemory 1301, a touchscreen 1302, a central processing unit (CPU forshort) 1303, a peripheral interface 1304, an RF circuit 1305, an audiofrequency circuit 1306, a speaker 1307, a power management chip 1308, aninput/output (I/O) subsystem 1309, another input/control device 1310, asensor array 1311, and a microphone 1313. These components communicateby using one or more communications buses or signal cables 1312.

The following provides a detailed description of each component of themobile phone for displaying a graphical user interface provided in thisembodiment.

The memory 1301 is configured to store a software program or a softwaremodule. By running the software program stored in the memory 1301, theCPU 1303 executes various functions or applications and data processingof the mobile phone 100. The memory 1301 may primarily include a programstorage area and a data storage area, where the program storage area maystore an operating system, and an application program required by atleast one function (such as an audio play function or a video playfunction), and the like; and the data storage area may store data (suchas audio data or a phonebook) created according to use of the mobilephone 100, and the like. In addition, the memory 1301 may include ahigh-speed random access memory, and may also include a non-volatilememory, for example, at least one magnetic disk storage device, a flashmemory device, or another volatile solid-state storage device.

The peripheral interface 1304 may couple input and output peripherals ofthe mobile phone to the CPU 1303 and the memory 1301. One or more CPU1303 s run or execute various software programs or instruction sets thatare stored in the memory 1301, so as to implement various functions anddata processing of the mobile phone 100.

The RF circuit 1305 may be configured to receive and send information,or receive and send an electrical signal in a call process. Inparticular, after receiving downlink information of a base station, theRF circuit 1305 sends the downlink information to the CPU 1303 forprocessing. In addition, the RF circuit 1305 sends related uplink datato the base station. Generally, the RF circuit 1305 includes but is notlimited to an antenna, at least one amplifier, a transceiver, a coupler,a low noise amplifier, and a duplexer. In addition, the RF circuit 1305may further communicate with a network and another device by means ofwireless communication. The wireless communication may use anycommunications standard or protocol, including but not limited to theGSM (Global System of Mobile communication, Global System of Mobilecommunication), the GPRS (General Packet Radio Service, General PacketRadio Service), the CDMA (Code Division Multiple Access, Code DivisionMultiple Access), the WCDMA (Wideband Code Division Multiple Access,Wideband Code Division Multiple Access), the LTE (Long Term Evolution,Long Term Evolution), an email, an SMS service (Short Messaging Service,short messaging service), and the like.

The touchscreen 1302 may be configured to collect a touch operation(such as an operation performed by a user on the touchscreen 1302 ornear the touchscreen 1302 by using any proper object or accessory, suchas a finger or a stylus) on or near the touchscreen 1302, and starts acorresponding connected apparatus according to a preset program.Optionally, the touchscreen 1302 may include two parts: a touch paneland a touch controller. The touch panel detects a touch location of auser, detects a signal brought by the touch operation, and sends thesignal to the touch controller. The touch controller receives touchinformation from the touch panel, converts the touch information intotouch point coordinates, sends the touch point coordinates to the CPU1303, and can receive and execute a command sent by the CPU 1303. Inaddition, multiple types of touch panels, such as a resistive type, acapacitive type, infrared, and a surface acoustic wave, may beimplemented for the touchscreen 1302.

In addition, the touchscreen 1302 may further be configured to displayinformation input by the user or information provided for the user andvarious menus of the mobile phone 100. Therefore, the touchscreen 1302may further include a display panel. Optionally, the display panel maybe configured in a form of an LCD (Liquid Crystal Display, liquidcrystal display), an OLED (Organic Light-Emitting Diode, organiclight-emitting diode), or the like.

Further, the touch panel may cover the display panel. When detecting atouch operation on or near the touch panel, the touch panel transmitsthe touch operation to the CPU 1303 to determine a type of a touchevent, and then the CPU 1303 provides corresponding visual output on thedisplay panel according to the type of the touch event.

The mobile phone 100 may further include at least one type of sensorarray 1311, such as a light sensor, a pressure sensor, a motion sensor,or another sensor. Specifically, a light sensor may include an ambientlight sensor and a proximity sensor. The ambient light sensor may adjustluminance of the touchscreen 1302 according to brightness or dimness ofambient light, and the proximity sensor may turn off display of thetouchscreen 1302 when the mobile phone 100 approaches an ear. As a typeof the motion sensor, an accelerometer sensor may detect an accelerationvalue in each direction (generally three axes), and detect a value and adirection of gravity when the acceleration sensor is stationary, and isapplicable to an application used for recognizing a mobile phone posture(for example, switching of a screen between a landscape orientation anda portrait orientation, a related game, and magnetometer posturecalibration), a function related to vibration recognition (such as apedometer or a knock), and the like. Other sensors such as a gyroscope,a barometer, a hygrometer, a thermometer, and an infrared sensor mayalso be disposed on the mobile phone 100. Details are not describedherein.

The sensor array 1311 described in this embodiment may be one sensor, ormay be a combination of multiple sensors; and may be one type of sensor,or may be a combination of multiple types of sensors.

An audio frequency circuit 1306, a speaker 1307, and a microphone 1313may provide audio interfaces between the user and the mobile phone 100.The audio frequency circuit 1306 may transmit an electrical signalobtained after received audio data is converted to the speaker 1307, andthe speaker 1307 converts the electrical signal into a voice signal foroutput. In addition, the microphone 1313 converts a collected voicesignal into an electrical signal, the audio frequency circuit 1306receives the electrical signal, converts the electrical signal intoaudio data, and outputs the audio data to the RF circuit 1305, so as tosend the audio data, for example, to another mobile phone, or output theaudio data to the memory 1301 for further processing after being invokedby the CPU 1303.

The central processing unit (CPU) 1303 is a control center of the mobilephone 100, and uses various interfaces and lines to connect all parts ofthe entire mobile phone. By running or executing a software program oran instruction set that is stored in the memory 1301 and invoking datastored in the memory 1301, the CPU executes various functions and dataprocessing of the mobile phone 100, so as to perform overall monitoringon the mobile phone. Optionally, the CPU 1303 may include one or moreprocessing units. Preferably, an application processor and a modemprocessor may be integrated into the CPU 1303, where the applicationprocessor primarily handles an operating system, a user interface, anapplication program, and the like; and the modem processor primarilyhandles wireless communication. It may be understood that the foregoingmodem processor may not be integrated into the CPU 1303.

The mobile phone 100 further includes a power supply (such as a battery)that supplies power to each part. Preferably, the power supply may belogically connected to the CPU 1303 by using the power management chip1308, so as to implement functions, such as management of charging,discharging, and power consumption control, by using the powermanagement chip 1308.

Although not shown, the mobile phone 100 may further include a camera, ashort-distance communications module (for example, Bluetooth and NFC),and the like. Details are not described herein.

In this embodiment of the present disclosure, the sensor array 1311 isdisposed on a frame of the mobile phone 100 that is on a same side withthe touchscreen 1302. Specifically, the sensor array 1311 may be a lightsensor array including the light sensors 204 a to 204 h shown in FIG. 2,or may be a pressure sensor array. The CPU 1303 determines, according toa voltage change of sensed data collected by the sensor array 1311,whether the touchscreen 1302 of the mobile phone is shielded by anobstruction, so as to determine a shielded part and an unshielded partthat are of the touchscreen 1302. A specific determining method isdescribed in detail in the foregoing embodiment. Details are notdescribed herein again.

“Shield” specifically means that a part of the touchscreen of the mobilephone is covered by an obstruction, which causes a case in which theuser cannot see covered display content. For example, a display area of30% of a touchscreen of a tablet computer is covered by a book, or adisplay area of 40% of a display screen of a mobile phone is covered bya palm (one palm or two palms) of a user, which may be considered thatthe touchscreen 1302 of the mobile phone is shielded by an obstruction(such as a book or a palm). Certainly, in a normal operation process ofthe mobile phone, the user uses a finger to tap the touchscreen or slideon the touchscreen. This normal operation essentially makes a part ofthe touchscreen of the mobile phone covered by a moving figure. Thisembodiment may also include this case. However, it may be understoodthat to distinguish the normal operation (such as tap or slide)performed on the touchscreen by a figure of the user, a preset thresholdmay be set in the mobile phone. When an area of the touchscreen of themobile phone covered by an obstruction exceeds the preset threshold, themobile phone may determine that the touchscreen is shielded.

When the CPU 1303 determines that a part of the touchscreen 1302 isshielded by an obstruction, the CPU 1303 determines a shielded area anda display area of the touchscreen 1302. The shielded area of thetouchscreen refers to an area of the touchscreen that is covered by anobstruction, and the display area of the touchscreen refers to an areaof the touchscreen that is not covered by the obstruction. For example,in FIG. 4, a shielded area of the touchscreen is the area 201-1 of thetouchscreen indicated by a dashed line in the figure, and a display areaof the touchscreen is the area 201-2 of the touchscreen that is notshielded by the obstruction 301 (that is, the remaining area of thetouchscreen except the area indicated by a dashed line in FIG. 4). Itmay be understood that the area 201-1 and the area 201-2 is a sum ofareas of graphical user interfaces displayed on the touchscreen to theuser when the display screen is in a normal state (for example, thedisplay screen is not shielded by an obstruction). The display area isused to display a graphical user interface.

If the CPU 1303 determines that the touchscreen 1302 is shielded, theCPU 1302 invokes, according to parameter information of the determineddisplay area (such as a size of the display area and a position of thedisplay area in the touchscreen), a graphical user interface thatmatches the parameter information in a graphic module 1314 of the memory1301, and displays the graphical user interface by using the touchscreen1302. That the foregoing CPU 1302 invokes the graphical user interfacethat matches the display area may be specifically: obtaining, by the CPU1302 according to a size of the display area in the parameterinformation, a graphical user interface of a window widget or anapplication, where the graphical user interface of the application iscorresponding to the size of the display area; or obtaining, accordingto a position of the display area in the parameter information, agraphical user interface of a window widget or an application, where thewindow widget or the application is corresponding to the position of thedisplay area.

In this embodiment of the present disclosure, whether a touchscreen of amobile phone is shielded is determined. When the touchscreen isshielded, a graphical user interface is displayed in a display area, sothat the graphical user interface can be displayed only in the displayarea of the display screen and does not need to be displayed in fullscreen, which reduces a possibility of information leakage and ensuresbetter privacy.

Another embodiment of the present disclosure provides a graphical userinterface used for displaying on a display screen of a mobile terminal,and the graphical user interface includes a first graphical userinterface and a second graphical user interface, where

the first graphical user interface of an application is displayed infull screen on the display screen; and

when it is detected that the display screen is shielded by anobstruction, the second graphical user interface of the application isdisplayed in a display area of the display screen, where the displayarea is an area of the display screen that is not shielded by theobstruction, and quantities of graphic controls of the first graphicaluser interface and graphic controls of the second graphical userinterface are the same.

Another embodiment of the present disclosure discloses a mobileterminal, where the mobile terminal includes a display screen, and themobile terminal further includes:

a judging module, configured to determine whether the display screen ofthe mobile terminal is shielded;

a determining module, configured to: when the judging module determinesthat the display screen is shield, determine a shielded area and adisplay area of the display screen, where the display area is used todisplay a graphical user interface; and the determining module isfurther configured to determine parameter information of the displayarea, where the parameter information includes an area size of thedisplay area and a position of the display area in the display screen;and

a display module, configured to obtain, according to the parameterinformation in the determining module, a graphical user interface thatmatches the display area, and display the graphical user interface inthe display area.

The mobile terminal further includes a sensor module that is connectedto the judging module; and that the judging module determines whetherthe display screen of the mobile terminal is shielded may bespecifically: detecting, by the sensor module, an ambient lightintensity; and determining, by the judging module, whether the displayscreen is shielded according to whether a change value of the ambientlight intensity is greater than a preset change threshold.

That the determining module determines the shielded area and the displayarea of the display screen is specifically: determining, by thedetermining module, an area whose ambient light intensity is greaterthan or equal to a preset first threshold and that is in the displayscreen as a display area, and determining an area whose ambient lightintensity is less than the preset first threshold and that is in thedisplay screen as a shielded area.

A graphical user interface displayed in the display area may bespecifically a graphical user interface that is of an application andthat is displayed on the display screen before the display screen isshielded.

It may be understood that a mobile terminal in this embodiment of thepresent disclosure may be configured to execute the technical solutionof the foregoing method embodiment.

An embodiment of the present disclosure further provides a mobileterminal. The mobile terminal includes one or more processors, adisplay, a storage apparatus, and one or more programs. The one or moreprograms are stored in the storage apparatus and are configured to beexecuted by the one or more processors, and the one or more programsinclude:

determining whether the display is shielded;

when it is determined that the display is shielded, determining ashielded area and a display area of the display, where the display areais used to display a graphical user interface;

determining parameter information of the display area, where theparameter information includes an area size of the display area and aposition of the display area in the display; and

obtaining, according to the parameter information, a graphical userinterface that matches the display area, and displaying the graphicaluser interface in the display area.

In the foregoing embodiments, the display screen, the screen, thetouchscreen, and the display may refer to a same device, and the deviceincludes the display panel and the touch panel described in theforegoing embodiments.

A person of ordinary skill in the art may understand that all or a partof the steps of the embodiments may be implemented by hardware or aprogram instructing relevant hardware. The program may be stored in acomputer readable storage medium. The storage medium may include aread-only memory, a magnetic disc, or an optical disc.

The foregoing descriptions are merely exemplary embodiments of thepresent disclosure, and are not intended to limit the presentdisclosure. Any modification, equivalent replacement, or improvementmade without departing from the spirit and principle of the presentdisclosure should fall within the protection scope of the presentdisclosure.

1. A method for displaying a graphical user interface (GUI), the methodcomprising: displaying a first GUI of an application in a display of themobile terminal; determining whether the display of the mobile terminalis shielded; in response to determining that the display is shielded,determining a shielded area and a display area of the display, whereinthe display area is used to display a first portion of the first GUI andthe shielded area of the display is not used to display a second portionof the first GUI; determining parameter information of the display area,wherein the parameter information comprises an area size of the displayarea and a position of the display area in the display; obtaining,according to the area size and the position of the display area in theparameter information, a second GUI of the application that matches thearea size and the position of the display area; and displaying thesecond GUI in the display area, wherein graphical elements of the firstGUI are the same as graphical elements of the second GUI.
 2. The methodaccording to claim 1, wherein the determining whether the display of themobile terminal is shielded comprises: detecting an ambient lightintensity by using a light sensor disposed on the mobile terminal; anddetermining whether the display is shielded according to whether achange value of the ambient light intensity is greater than a presetchange threshold.
 3. The method according to claim 1, wherein two groupsof light sensors configured to detect an ambient light intensity aredisposed on the mobile terminal, wherein the two groups of light sensorsinclude a first group of light sensors and a second group of lightsensors; and the determining whether the display of the mobile terminalis shielded comprises: determining whether ambient light intensitiesdetected by the first group of light sensors are less than ambient lightintensities detected by the second group of light sensors at the sametime.
 4. The method according to claim 2, wherein the determining theshielded area and the display area of the display comprises: determiningan area whose ambient light intensity is greater than or equal to apreset first threshold and that is in the display as a display area; anddetermining an area whose ambient light intensity is less than thepreset first threshold and that is in the display as a shielded area. 5.The method according to claim 1, wherein the determining whether thedisplay of the mobile terminal is shielded comprises: detecting, byusing a pressure sensor disposed on the mobile terminal, whether apressure value applied on the display is greater than or equal to apreset pressure threshold, to determine whether the display of themobile terminal is shielded.
 6. The method according to claim 5, whereinthe determining the shielded area and the display area of the displaycomprises: determining an area whose pressure value applied on thedisplay is greater than or equal to a preset second threshold as ashielded area; and determining an area whose pressure value applied onthe display is less than the preset second threshold as a display area.7. The method according to claim 1, wherein before the determiningwhether a display of the mobile terminal is shielded, the method furthercomprises: detecting whether the display is lighted up.
 8. The methodaccording to claim 1, wherein the first portion of the first GUIdisplayed in the display area is displayed on the display before thedisplay is shielded. 9-13. (canceled)
 14. A mobile terminal, comprising:a touchscreen; a memory storing instructions; and a processor configuredto execute the instructions to cause the mobile terminal to: display afirst graphical user interface (GUI) of an application in thetouchscreen of the mobile terminal; determine whether the touchscreen ofthe mobile terminal is shielded; in response to determining that thetouchscreen is shielded, determine a shielded area and a display area ofthe touchscreen, wherein the display area is used to display a firstportion of the first GUI and the shielded area of the display a firstportion of the first GUI; determine parameter information of the displayarea, wherein the parameter information comprises an area size of thedisplay area and a position of the display area in the touchscreen;obtain, according to the area size and the position of the display areain parameter information, a second GUI of the application that matchesthe area size and the position of the display area; and display thesecond GUI in the display area of the touchscreen, wherein graphicalelements of the first GUI are the same as graphical elements of thesecond GUI.
 15. The mobile terminal according to claim 14, wherein themobile terminal further comprises a light sensor array, wherein thelight sensor array is connected to the processor; and determiningwhether the touchscreen of the mobile terminal is shielded comprises:detecting, by the light sensor array, an ambient light intensity; anddetermining, by the processor, whether the touchscreen is shieldedaccording to whether a change value of the ambient light intensity isgreater than a preset change threshold.
 16. The mobile terminalaccording to claim 15, wherein determining the shielded area and thedisplay area of the touchscreen comprises: determining, by theprocessor, an area whose ambient light intensity is greater than orequal to a preset first threshold as a display area in the touchscreen,and determining an area whose ambient light intensity is less than thepreset first threshold as a shielded area in the touchscreen.
 17. Themobile terminal according to claim 14, wherein the mobile terminalfurther comprises a pressure sensor array, wherein the pressure sensorarray is connected to the processor; and determining whether thetouchscreen of the mobile terminal is shielded comprises: detecting, bythe pressure sensor array, a pressure value applied on the touchscreen;and determining, by the processor, whether the touchscreen of the mobileterminal is shielded according to whether the pressure value is greaterthan a preset pressure threshold.
 18. The mobile terminal according toclaim 17, wherein determining the shielded area and the display area ofthe touchscreen comprises: determining, by the processor, an area whosepressure value applied on the touchscreen is greater than or equal to apreset second threshold as a shielded area; and determining an areawhose pressure value applied on the touchscreen is less than the presetsecond threshold as a display area.
 19. The mobile terminal according toclaim 14, wherein the first portion of the first GUI displayed in thedisplay area is displayed on the touchscreen before the touchscreen isshielded.
 20. A mobile terminal, comprising: one or more processors; adisplay; and a storage apparatus storing one or more programs, whereinthe one or more programs are configured to be executed by the one ormore processors to cause the mobile terminal to: display a firstgraphical user interface (GUI) of an application in the display of themobile terminal; determine whether the display is shielded; in responseto determining that the display is shielded, determine a shielded areaand a display area of the display, wherein the display area is used todisplay a first portion of the first GUI and the shielded area of thedisplay is not used to display a second portion of the first GUI;determine parameter information of the display area, wherein theparameter information comprises an area size of the display area and aposition of the display area in the display; obtain, according to thearea size and the position of the display area in the parameterinformation, a second GUI of the application that matches the area sizeand the position of the display area; and display the second GUI in thedisplay area, wherein graphical elements of the first GUI are the sameas graphical elements of the second GUI.
 21. (canceled)